# 刷新文件中数据，直接将原有数据清除并输入新数据
def RefreshFunction(main_list):
    Write = open("information.txt", 'w', encoding="UTF-8")
    count = 0
    for second_list in main_list:
        for detail in second_list:
            Write.write(f"{detail} ")
        count += 1
        if count != len(main_list):
            Write.write("\n")


if __name__ == '__main__':
    test_list = [[1, 2, 3], [2, 3, 4], [3, 4, 5]]
    RefreshFunction(test_list)
